import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const baseUrl = Vue.prototype.$itsoftUI.config.serviceUrl + "/repair"

//用户常用地址api
export const userCommonAddressApi = {
    List: function () {
        const data = {
            enablePaging: 1
        }
        return request({
            url: baseUrl + '/userCommonAddress/list',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    Del: function (ids) {
        const data = {
            ids: ids
        }
        return request({
            url: baseUrl + '/userCommonAddress/delete',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    Get: function (id) {
        const data = {
            id: id
        }
        return request({
            url: baseUrl + '/userCommonAddress/get',
            method: 'post',
            data: qs.stringify(data)
        })
    },
    Save: function (data) {
        const config = {
            headers: {
                'Content-Type': 'application/json;charset=utf-8'
            },
        }
        return request.post(baseUrl + "/userCommonAddress/save", data, config)
    }
}